//
//  LJM_FM_CollectionViewCell.m
//  wind
//
//  Created by 李金明 on 16/1/17.
//  Copyright © 2016年 李金明. All rights reserved.
//

#import "LJM_FM_CollectionViewCell.h"

@implementation LJM_FM_CollectionViewCell
- (void)dealloc
{
    [_buttonImageV release];
    [_imageV release];
    [_titleLab release];
    [_sonNumLab release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}
- (void)creatView
{
    self.backgroundColor = [UIColor whiteColor];
    self.imageV = [[UIImageView alloc] init];
    self.imageV.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.imageV];
    [_imageV release];
    
    self.buttonImageV = [[UIImageView alloc] init];
    self.buttonImageV.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.buttonImageV];
    [_buttonImageV release];
    
    self.titleLab = [[UILabel alloc] init];
    self.titleLab.textColor = [UIColor whiteColor];
    self.titleLab.backgroundColor = [UIColor clearColor];
    self.titleLab.font = [UIFont boldSystemFontOfSize:20.0];
    self.titleLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.titleLab];
    [_titleLab release];
    
    self.sonNumLab = [[UILabel alloc] init];
    self.sonNumLab.textColor = [UIColor whiteColor];
    self.sonNumLab.font = [UIFont systemFontOfSize:15];
    self.sonNumLab.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.sonNumLab];
    [_sonNumLab release];
    
    
}
- (void)layoutSubviews
{
[self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
    make.right.left.top.bottom.equalTo(self);
}];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.mas_centerY);
        make.centerX.equalTo(self.mas_centerX);
        make.width.mas_equalTo(@100);
        make.height.mas_equalTo(@30);
    }];
    [self.sonNumLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_centerY);
        make.centerX.equalTo(self.mas_centerX);
        make.width.mas_equalTo(@100);
        make.height.mas_equalTo(@20);
    }];
    [self.buttonImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.mas_bottom).offset(-5);
        make.right.equalTo(self.mas_right).offset(-5);
        make.width.mas_equalTo(@30);
        make.height.mas_equalTo(@30);
    }];

}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
